<?php
class CommentsController extends AppController {

	var $name = 'Comments';
	var $helpers = array('Form');

	function index()
		{
			 $this->set('comments', $this->Comment->find('all'));
		}

	function add()
		{
		if (!empty($this->data['Comment']))
			{
				if($this->Comment->save($this->data['Comment']))
					{
						$this->flash('Your Comment has been updated.','/potholes/');
					}
			}
		}
	function view($id) {
			$this->Comment->ID = $id;
			$this->set('data', $this->Comment->read());
		}

}
?>
